function DebuggerLoader() {
    var count = 0;
    function loadDebugger() {
        var eScript = document.createElement("script");
        eScript.src = "vconsole.min.js";
        document.body.append(eScript);
        eScript.onload = function () {
            var vConsole = new VConsole();
            vConsole.show();
            console.log("hi");
        };
    }
    function triggerLoad(needTrrigerCount) {
        if (needTrrigerCount == null || needTrrigerCount == undefined) {
            needTrrigerCount = 10;
        }

        if (count < needTrrigerCount - 1) {
            count++;
            return;
        }
        count = 1;
        needTrrigerCount = 0;
        loadDebugger();
    }
    return {
        loadDebugger: loadDebugger,
        triggerLoad: triggerLoad,
    };
}

var debuggerLoader = DebuggerLoader();
window.onload = function () {
    document.getElementById("brand").onclick = function () {
        debuggerLoader.triggerLoad(3);
    };
};
